Advertisement
IT_IT

Генератор чисел

Jul 2nd, 2021
2,390
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f = open("cmd.txt","w")
  2. a = range(5)
  3. list(a)
  4. [0, 1, 2, 3, 4]
  5. def infinite_sequence():
  6.     num = 0
  7.     while True:
  8.         yield num
  9.         num += 1
  10. for i in infinite_sequence():
  11.     print("javascript:addBundleToCart("+str(i)+");\n", end=" ", file=f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement