x='buffalo'
exec("%s = %d" % (x,2))
After that you can check it by:
print buffalo
As an output you will see:
2
More Related Contents:
- What is wrong with my python code? [duplicate]
- how to count average sentence length (in words) from a text file contains 100 sentences using python [closed]
- What needs to be added
- Writing a Python list of lists to a csv file
- How to write a Python module/package?
- Python: pop from empty list
- Check if a string in a Pandas DataFrame column is in a list of strings
- Can Python pickle lambda functions?
- Naturally sorting Pandas DataFrame
- How To Get All The Contiguous Substrings Of A String In Python?
- is it possible to run pygame or pyglet in a browser?
- Running powershell script within python script, how to make python print the powershell output while it is running
- Print LIST of unicode chars without escape characters
- Python3 correct way to import relative or absolute?
- Use Multiple Character Delimiter in Python Pandas read_csv
- Cancellable threading.Timer in Python
- Python OrderedDict not keeping element order [duplicate]
- Pip freeze vs. pip list
- pandas: replace string with another string
- Why does ENcoding a string result in a DEcoding error (UnicodeDecodeError)?
- Pyodbc – “Data source name not found, and no default driver specified”
- how to merge two data frames based on particular column in pandas python?
- sum each value in a list of tuples
- Why does dict(k=4, z=2).update(dict(l=1)) return None in Python? [duplicate]
- How do I make matplotlib open a box for user comments?
- getattr and setattr on nested subobjects / chained properties?
- confused about random_state in decision tree of scikit learn
- Send method using generator. still trying to understand the send method and quirky behaviour
- Is possible to mapping view with class using mapper in SqlAlchemy?
- Python 2.7 : LookupError: unknown encoding: cp65001 [duplicate]