Answers for "convert python2 file to python3"

1

python2 to python3 converter

# example.py file 
def greet(name):
    print "Hello, {0}!".format(name)
print "What's your name?"
name = raw_input()
greet(name)

##It can be converted to Python 3.x code via 2to3 on the command line:
# 2to3 example.py
Posted by: Guest on April-08-2021

Code answers related to "convert python2 file to python3"

Python Answers by Framework

Browse Popular Code Answers by Language