From 855f27188373a7d3afe0d3d2ecf43247692796e1 Mon Sep 17 00:00:00 2001 From: samuel Date: Wed, 22 Jul 2020 16:58:06 +0200 Subject: [PATCH] I have done research and looked for tutorials I will finish it tomorrow --- .../__pycache__/Question.cpython-37.pyc | Bin 1029 -> 0 bytes sami/learn-python-the-hard-way/ex32.py | 11 ++----- sami/learn-python-the-hard-way/overlap.py | 29 ++++++++++++++++++ .../ungleich-learning-circle | 1 - 4 files changed, 32 insertions(+), 9 deletions(-) delete mode 100644 sami/learn-python-the-hard-way/__pycache__/Question.cpython-37.pyc create mode 100644 sami/learn-python-the-hard-way/overlap.py delete mode 160000 sami/learn-python-the-hard-way/ungleich-learning-circle diff --git a/sami/learn-python-the-hard-way/__pycache__/Question.cpython-37.pyc b/sami/learn-python-the-hard-way/__pycache__/Question.cpython-37.pyc deleted file mode 100644 index 059710a19630659426551c8f2d765e71fa2fe683..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1029 zcmb7DL2uJA6tL$n?vc53jzd_cAEqoCRKvSi`_OXu`}CQX_cP3Kf@p3 z$N0)=XHIb9y>x|%8?OBF`PuJ#etuuy937;)nbhqq)J%1{PdN{L86knGVN z@RE%B8#S`IsxalqL&(WMwro7;doUuf)Xg`E@#3=vq!Juggg#xlyH>kBhRX z9{R@3$}O}SyM-JtxDn$eUrqM)JZn}y$@5Z`F3*wQB0r%qU7!3pv)@0@B0Q{kE%V%` zd0uPLR)~jre%ZKO~3o?c`B^v)-y zRnX*eeFFLH5DcLaP5a-F8vF}@KKhpW<2_TpQ?fM})Sr1ki%()u7e0BhQ_@Q;$UX)$ Pq>tl(#?g=-he`4q;yC(c diff --git a/sami/learn-python-the-hard-way/ex32.py b/sami/learn-python-the-hard-way/ex32.py index 9e9ab6a..8cb910b 100644 --- a/sami/learn-python-the-hard-way/ex32.py +++ b/sami/learn-python-the-hard-way/ex32.py @@ -2,12 +2,9 @@ the_count = [1, 2, 3, 4, 5] fruits = ['apples', 'oranges', 'pears', 'apricots'] change = [1, 'pennies', 2, 'dimes', 3, 'quarters'] - # this first kind of for-loop goes through a listLOOPS AND LISTS for number in the_count: -print(f"This is count {number}") - - + print(f"This is count {number}") #same as above for fruit in fruits: @@ -21,13 +18,11 @@ for i in change: # we can also build lists, first start with an empty one elements = [] - # then use the range function to do 0 to 5 counts for i in range(0, 6): print(f"Adding {i} to the list.") - -# append is a function that lists understand -elements.append(i) + # append is a function that lists understand + elements.append(i) # now we can print them out too for i in elements: diff --git a/sami/learn-python-the-hard-way/overlap.py b/sami/learn-python-the-hard-way/overlap.py new file mode 100644 index 0000000..60e5a2a --- /dev/null +++ b/sami/learn-python-the-hard-way/overlap.py @@ -0,0 +1,29 @@ + +def overlapping(string1, string2): + for i in string1: + for e in string2: + if i == e: + return True + return False + + + + + + + + + + + + + + + + + + +#if address in network: + # do something + # ipaddress.ip_address('2001:DB8::1') +#IPv6Address('2001:db8::1') diff --git a/sami/learn-python-the-hard-way/ungleich-learning-circle b/sami/learn-python-the-hard-way/ungleich-learning-circle deleted file mode 160000 index a0012ef..0000000 --- a/sami/learn-python-the-hard-way/ungleich-learning-circle +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a0012ef6c4d44c875a3173fc746ab0a9259bc531