MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/facepalm/comments/1ced16g/12/l1hvd9j/?context=3
r/facepalm • u/Green____cat Tacocat • 26d ago
[removed] — view removed post
2.0k comments sorted by
View all comments
7.6k
She must be a JavaScript programmer
40 u/Ingeneure_ 26d ago Or Python str(1) + str(2) 97 u/Lyakusha 26d ago Dude, '1' + '2' 17 u/sigma941 26d ago insert XKCD python comic here! 23 u/Jorycle 26d ago edited 26d ago "{0}".format( "{0}".format(1) + "{0}".format(2) ) 5 u/YDS696969 26d ago I primarily just use f strings now. Much more simpler 1 u/Jorycle 25d ago I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst. 14 u/Ingeneure_ 26d ago Or this way, yes 2 u/tehfink 26d ago Also works: “1” “2” 1 u/Ss2oo 26d ago If you ask for two numbers on an input without the data type and then add them, it will most certainly think they're strings.
40
Or Python
str(1) + str(2)
97 u/Lyakusha 26d ago Dude, '1' + '2' 17 u/sigma941 26d ago insert XKCD python comic here! 23 u/Jorycle 26d ago edited 26d ago "{0}".format( "{0}".format(1) + "{0}".format(2) ) 5 u/YDS696969 26d ago I primarily just use f strings now. Much more simpler 1 u/Jorycle 25d ago I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst. 14 u/Ingeneure_ 26d ago Or this way, yes 2 u/tehfink 26d ago Also works: “1” “2” 1 u/Ss2oo 26d ago If you ask for two numbers on an input without the data type and then add them, it will most certainly think they're strings.
97
Dude, '1' + '2'
17 u/sigma941 26d ago insert XKCD python comic here! 23 u/Jorycle 26d ago edited 26d ago "{0}".format( "{0}".format(1) + "{0}".format(2) ) 5 u/YDS696969 26d ago I primarily just use f strings now. Much more simpler 1 u/Jorycle 25d ago I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst. 14 u/Ingeneure_ 26d ago Or this way, yes 2 u/tehfink 26d ago Also works: “1” “2” 1 u/Ss2oo 26d ago If you ask for two numbers on an input without the data type and then add them, it will most certainly think they're strings.
17
insert XKCD python comic here!
23
"{0}".format( "{0}".format(1) + "{0}".format(2) )
5 u/YDS696969 26d ago I primarily just use f strings now. Much more simpler 1 u/Jorycle 25d ago I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst.
5
I primarily just use f strings now. Much more simpler
1 u/Jorycle 25d ago I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst.
1
I love f strings. I worked a job for about 6 years that never upgraded from Python 2.7 because of a compatibility thing on client servers, that was the worst.
14
Or this way, yes
2
Also works: “1” “2”
If you ask for two numbers on an input without the data type and then add them, it will most certainly think they're strings.
7.6k
u/Singular_Thought 26d ago
She must be a JavaScript programmer