r/badcode • • Oct 27 '21

python str()

Post image
836 Upvotes

58 comments sorted by

View all comments

62

u/SoulslikePursuer Oct 27 '21

Let me guess:

If number == 18: number = "18"

¿

99

u/30p87 Oct 27 '21

No no,

	number = str(number)

41

u/CreatureWarrior Oct 27 '21

That's one brave assumption

24

u/SoulslikePursuer Oct 27 '21

I'm a risky boi ya know

7

u/Ryan-the-lion Oct 27 '21

How'd you figure this out?

10

u/SoulslikePursuer Oct 27 '21

Years of deduction training...