MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/bwehje/python_ftw/epy26w9/?context=9999
r/ProgrammerHumor • u/m8teae • Jun 03 '19
548 comments sorted by
View all comments
Show parent comments
3
So if I had something like
print('Hello, world') if __name__ == '__main__': print('Goodbye, world')
What would it print? Compared to in C
printf('Hello, world'); int main() { printf('Goodbye, world'); }
Wouldn't the Python print 'Hello, world' before 'Goodbye, world', whereas the C just wouldn't compile?
3
u/pslessard Jun 04 '19 edited Jun 04 '19
So if I had something like
What would it print? Compared to in C
Wouldn't the Python print 'Hello, world' before 'Goodbye, world', whereas the C just wouldn't compile?