initial creation

This commit is contained in:
2025-05-20 11:57:43 -04:00
commit c98b612926
8447 changed files with 1862526 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env python
# sum the squares of a list of numbers
# using list comprehension, entire list is stored in memory
s1 = sum([x * x for x in range(10)]) # <1>
# only one square is in memory at a time with generator expression
s2 = sum(x * x for x in range(10)) # <2>
print(s1, s2)
print()
page = open("../DATA/mary.txt")
m = max(len(line) for line in page) # <3>
page.close()
print(m)