Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python print value and variable name

#!/usr/bin/env python3
foo = 1
bar = 2
print(f"{foo=} {bar=}")
Comment

python print variable name

>>> first = 'John'
>>> last = 'Doe'
>>> print '%(first)s %(last)s' % globals()
John Doe
Comment

PREVIOUS NEXT
Code Example
Python :: python loop over list 
Python :: how to make spinning donut on python 
Python :: python quiz answer stores 
Python :: python frozenset 
Python :: how to use underscore in python 
Python :: pythagore 
Python :: add in python 
Python :: pytube3 
Python :: python http post file 
Python :: how to unstack multiindex pandas 
Python :: reverse linked list python 
Python :: editing specific line in text file in python 
Python :: how to make window pygame 
Python :: how to remove .0 from string column with empty strings in python 
Python :: "scrapy shell" pass cookies to fetch 
Python :: pyhon 
Python :: how to get value_counts() order 
Python :: discord api python putting ids in a list 
Python :: stackoverflow - import data on colabs 
Python :: proxy pool for scrapy 
Python :: python togli spazio 
Python :: python openstreetmap multiple latitude 
Python :: python regex words with apostrophe in middle 
Shell :: how to check if am using wayland 
Shell :: npm change registry 
Shell :: delete files with a certain extension recursively 
Shell :: Warning: heroku update available from 7.47.4 to 7.47.5 
Shell :: git undo soft reset 
Shell :: restart rabbitmq service linux 
Shell :: pip install tqdm 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =