Skip to content

Instantly share code, notes, and snippets.

@rzhade3
Last active March 22, 2018 19:27
Show Gist options
  • Save rzhade3/0de15461520df2cea5dd3dddf8c18622 to your computer and use it in GitHub Desktop.
Save rzhade3/0de15461520df2cea5dd3dddf8c18622 to your computer and use it in GitHub Desktop.
Simple Python script to show the differences between Python2 and Python3. Try converting this script to Python3 while keeping all of the functionality exactly the same!
def coolBeans():
n = int(raw_input())
for i in range(0, n):
print "Hello World"
if __name__ == '__main__':
coolBeans()
x = 5
try:
x += input()
print x
except:
raise IOError, "Something"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment