co1=["CM","CD","XC","XL","IX","IV"]
s='AAMCML'
for i,j in enumerate(s):
if i<len(s)-1 and ((j+s[i+1]) in co1):
print(j+s[i+1])
**SKIP NEXT LOOP VALUE (I don't need the next value in loop to be printed.
Here it would be M)**
print(j)
我希望打印结果像[A A M CM L](它不一定是列表,只需打印)。在这种情况下,不应在输出中打印C后的M。任何建议都会有所帮助!