简体   繁体   中英

How to avoid printing commented out code in for loop

If I run this loop, A will print 10 times.

for i in range(10):
   """
   A
   """
   pass

How do I stop this?

在此处输入图像描述

I run this code in the python idle shell and got the same output. But when i run it in a file it stops printing this. So try running it in a file , not in command prompt or the idle shell

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM