Last active
January 2, 2019 20:18
-
-
Save SeePetulaCode/fa8dfa4cdcd364dff905c3a7a831e391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import sys | |
import os | |
def numbers(x): | |
for i in range(x): | |
if i % 2 == 0: | |
yield i | |
listNums = list(numbers(11)) | |
print(listNums[1:]) | |
#------------------------------------------------- | |
def make_word(): | |
word = "" | |
for ch in "spam-a-lot": | |
word += ch | |
yield word | |
print(list(make_word())) | |
# -------------------------- Sets ---------------- | |
nums = {"a", "b", "c", "d"} | |
nums.add("e") | |
totalNums = len(nums) | |
print(" Totsl numbers in the set are: " + str(totalNums)) | |
''' | |
name = input("Enter name: ") | |
print("hello " + name +"!") | |
#this is a comment | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment