Python Integer Trick?? #python #coding #programming


0
Python Integer Trick?? #python #coding #programming



#Python #Integer #Trick #python #coding #programming

Did you know that in Python if you have a really long integer like this you can actually add underscores in between to make it a little more readable and you can actually run operations on this because python recognizes these as just regular integers we’ll do num1 times num2 won’t print our answer

And there we go but our answer is unreadable but we can actually fix that in the print statement we’ll add an F string and we’ll do answer colon comma and it will print our answer with commas in between could do the same with underscores


Like it? Share with your friends!

0

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
win win
0
win
GuestGram

0 Comments

Choose A Format
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
Video
Youtube and Vimeo Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format