Jan-01-2019, 06:16 PM
As you say, index is an integer. You can't slice an integer, so
But I'm not sure how this is supposed to work. You're assigning one 'x' to a 13 long slice. I would think you would want to assign 12 x's to a 12 long slice. And your loop is just going to go through one iteration and then stop, because of the break statement. Are you planning to later put that into a conditional that finds the credit card number?
index[0:13]
is invalid. The only thing you have that you could do an assignment with a slice is spliced_list.But I'm not sure how this is supposed to work. You're assigning one 'x' to a 13 long slice. I would think you would want to assign 12 x's to a 12 long slice. And your loop is just going to go through one iteration and then stop, because of the break statement. Are you planning to later put that into a conditional that finds the credit card number?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures