Skip to content

Instantly share code, notes, and snippets.

@evgenidb
Created March 8, 2011 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgenidb/861242 to your computer and use it in GitHub Desktop.
Save evgenidb/861242 to your computer and use it in GitHub Desktop.
fmi.py-bg.net - bad coding 1
#Example 1:
# Wrong way:
if 1 > 0: print("Hello, World!")
# Correct way:
if 1 > 0:
print("Hello, World!")
# Reason - hard to read:
#Wrong way:
for x in [1, 'foo', ['foo', 'bar', "Hello", "World!", 'Hello, World!'], 2, 3, "aaaa", 4, 5, 6, 11111111111111323121]: print("Hello, World!")
#Correct way:
for x in [1, 'foo', ['foo', 'bar', "Hello", "World!", 'Hello, World!'], 2, 3, "aaaa", 4, 5, 6, 11111111111111323121]:
print("Hello, World!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment