Codes for quilting: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 11: Line 11:


<b>.random</b><br/>
<b>.random</b><br/>
from random import choice
words.sort()
words = ['weaving', 'with', 'words', 'and', 'code']
 
# First a simple loop through the list
for word in words:
    print(word)

Revision as of 16:35, 15 October 2020

loops
for x in range(10):

   print ("hello python")
   print (x)

x = 1 while x<10:

   print (f"x is {x}")
   x = x + 1

.random
words.sort() words = ['weaving', 'with', 'words', 'and', 'code']

  1. First a simple loop through the list

for word in words:

   print(word)