Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Quiz
#2
int(some_string) returns the integer value of some_string (if it can be decoded to an integer):

Output:
>>> type('00012') <type 'str'> >>> int('00012') 12 >>> type(int('00012')) <type 'int'>

What happens when the string is not all digits will be addressed when you come to it.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
Help with Quiz - by Learning2teach - May-23-2017, 07:34 PM
RE: Help with Quiz - by Ofnuts - May-23-2017, 08:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QUIZ GUI Form_When admin panel is open, main quiz form is getting freeze Uday 4 811 Aug-25-2023, 08:24 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020