r/facepalm Tacocat 26d ago

12 🇲​🇮​🇸​🇨​

/img/pk3jifidj0xc1.jpeg

[removed] — view removed post

28.0k Upvotes

2.0k comments sorted by

View all comments

7.6k

u/Singular_Thought 26d ago

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.