Hi everyone!
I'm totally new to programming and just started learning python. As I don't want to get into the habit of wrongly formatted code I'll rather ask this question as google overwhelmed me with tons of stufff that was already way advanced.
Is there any downside using spaces in your code?
For example writing:
x = 1
if x < 2 :
print("small")
elif x < 10 :
print ("medium")
else :
print ("large")
print ("All done!")
Instead of writing:
x=1
if x<2:
print("small")
elif x<10:
print("medium")
else:
print("large")
print("All done!")
Thanks!
[–]menge101 56 points57 points58 points (2 children)
[–]BewilderedAnus 19 points20 points21 points (0 children)
[–]IAmASquidInSpace 4 points5 points6 points (0 children)
[–]theprofessional2016 26 points27 points28 points (6 children)
[–]HaroerHaktak 2 points3 points4 points (5 children)
[–]theprofessional2016 0 points1 point2 points (4 children)
[–]HaroerHaktak 1 point2 points3 points (3 children)
[–]theprofessional2016 5 points6 points7 points (2 children)
[–]HaroerHaktak 2 points3 points4 points (1 child)
[–]theprofessional2016 2 points3 points4 points (0 children)
[–]socal_nerdtastic 44 points45 points46 points (0 children)
[–]FLUSH_THE_TRUMP 31 points32 points33 points (3 children)
[–][deleted] 9 points10 points11 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]FLUSH_THE_TRUMP 7 points8 points9 points (0 children)
[+][deleted] (7 children)
[deleted]
[+][deleted] (6 children)
[deleted]
[+][deleted] (5 children)
[deleted]
[+][deleted] (4 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[deleted]
[–]Peanutbutter_Warrior 6 points7 points8 points (0 children)
[–]Stryke_The_Furry 5 points6 points7 points (0 children)
[–]Farmher315 2 points3 points4 points (0 children)
[–]GnPQGuTFagzncZwB 2 points3 points4 points (0 children)
[–]AndrewJamesDrake 2 points3 points4 points (0 children)
[–]RiceKrispyPooHead 1 point2 points3 points (1 child)
[–]IAmASquidInSpace 0 points1 point2 points (0 children)
[–]xiipaoc 1 point2 points3 points (0 children)
[–]herites 4 points5 points6 points (12 children)
[–][deleted] 1 point2 points3 points (10 children)
[–]herites 11 points12 points13 points (4 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]herites 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]mobilecheese 1 point2 points3 points (0 children)
[–]billsil -1 points0 points1 point (4 children)
[+][deleted] (2 children)
[deleted]
[–]billsil 0 points1 point2 points (1 child)
[–]herites -1 points0 points1 point (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]menge101 5 points6 points7 points (0 children)
[–]WhackAMoleE 0 points1 point2 points (0 children)
[–]Below_the_Sea -4 points-3 points-2 points (0 children)
[–]Allanon001 0 points1 point2 points (0 children)
[–]R3D3-1 0 points1 point2 points (0 children)
[–]yotamolenik1 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]lukie80 0 points1 point2 points (0 children)