DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python use variable name as string
>>> foo = dict() >>> f'{foo=}'.split('=')[0] 'foo'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#variable
#string
ADD COMMENT
Topic
COMMENT
Name
4+3 =
Submit