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
class Node: | |
def __init__(self, value) -> None: | |
self.value = value | |
self.next = None | |
class SingleList: | |
def __init__(self) -> None: | |
self.head = None |
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
from turtle import mainloop | |
from unittest import main | |
class Observable: | |
def __init__(self): | |
self._observers = [] | |
def register_observer(self, observer): | |
self._observers.append(observer) |
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
# a,b,c =1,2,3 | |
# print(a) if a>b else print(b) if (b>c) else print(c) | |
# l =[x for x in range(0,10,14)] | |
# print(l) | |
# a=1 | |
# a=[1,2,3] | |
# b = a | |
# a.append('b') |
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
l = [ | |
1, | |
2, | |
3, | |
3, | |
3, | |
4, | |
4, | |
4, | |
5, |
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 sys | |
input_list = [] | |
count = 0 | |
for line in sys.stdin: | |
input_list.append(line) | |
count += 1 | |
if count == 2: | |
break |
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
from datetime import date, timedelta | |
print("enter date in this fromat year month date[yyyy mm dd]") | |
sdate = input("enter start date: ") | |
edate = input("enter end date: ") | |
print( | |
"enter exact this words for weekday sunday monday tuesday wednesday thursday friday saturday" | |
) | |
weekday = input("enter weekday: ") |
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
class Node: | |
def __init__(self, data=None, next=None): | |
# self.curr = None | |
self.data = data | |
self.next = next | |
def get_data(self): | |
return self.data |
OlderNewer