Answers for "convert python 2 to 3"

0

convert python 2 to 3

# Example Python 2 code
def greet(name):
    print "Hello, {0}!".format(name)
print "What's your name?"
name = raw_input()
greet(name)

# Invoke 2to3 on the command line.
2to3 example.py

# Docs for the module available at https://docs.python.org/3/library/2to3.html#module-lib2to3
Posted by: Guest on April-20-2021

Code answers related to "convert python 2 to 3"

Python Answers by Framework

Browse Popular Code Answers by Language