Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Subscripting Integers?
#1
How can I do something like this:

Code:
x = 29
if x[1] == 9:
    print "The second digit is 9"
else:
    print "The second digit is not 9"

However I can't do this because you can't subscript integers. How can I get around that?
Reply


Messages In This Thread
Subscripting Integers? - by nevets04 - 02-18-2010, 09:17 PM
RE: Subscripting Integers? - by uber1337 - 02-18-2010, 09:20 PM
RE: Subscripting Integers? - by nevets04 - 02-23-2010, 01:05 PM
RE: Subscripting Integers? - by Fallen - 02-21-2010, 08:54 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)