This is for prime number theory. This theory which actually shows up as an axiom factors numbers like 2^n-1 where n=11 or n=23 or n=29. Of course it would not factor n=7 or n=31 when those are Mersenne prime numbers.
Hopefully I can get help here I wish to do this all at once. I have this list below. I want to -11 from the entire list and then in the next instance mod 121 the list right after the subtraction while maintaining the enumerated list at the same time. Can this be done?
I'm getting this error:
print([x % 121 for x in lst1])
TypeError: not all arguments converted during string formatting
Here is part of the list and the code I have:
lst1 = [20, '231', 21, '243', 22, '247', 23, '253', 24, '259']
([int(i)-11 if isinstance(i, str) else i for i in lst1])
print([x % 121 for x in lst1])
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…