ofekkfir

shira ha hara

Mar 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.69 KB | None | 0 0
  1. def main (mizrachim):
  2.     rshimna = mizrachim.split(",")
  3.  
  4.     print ("enter num from 1-9 plz")
  5.     x= int(input("Please enter an num 1-9 : "))
  6.     while x!= 9:
  7.         if x == 1:
  8.             print(rshimna)
  9.             x = int(input())
  10.         if x == 2:
  11.             print(len(rshimna))
  12.             x = int(input())
  13.         if x ==3:
  14.             print ("enter the product you wanna check about")
  15.             y = str(input())
  16.             if y in rshimna:
  17.                 print("its there")
  18.             else:
  19.                 print("its not")
  20.             x = int(input())
  21.         if x == 4: #broken
  22.             print("enter the product you wanna check about")
  23.             z = str(input())
  24.             print (rshimna.count(z))
  25.             x = int(input())
  26.         if x == 5:
  27.             print("enter the product you wanna check about")
  28.             temp_str = str(input())
  29.             if temp_str in rshimna:
  30.                 rshimna.remove(temp_str)
  31.             x = int(input())
  32.         if x == 6:
  33.             print("enter the product you wanna do the thing about")
  34.             temp_str1 = str(input())
  35.             rshimna.append(temp_str1)
  36.             x = int(input())
  37.         if x == 7:
  38.             illigal_rshima = []
  39.             for item in rshimna:
  40.                 if len(item)< 3:
  41.                     illigal_rshima.append(item)
  42.                 if item.isalpha() == False:
  43.                     illigal_rshima.append(item)
  44.             print(illigal_rshima)
  45.             x = int(input())
  46.         if x == 8:
  47.             new_rshima = list(set(rshimna))
  48.  
  49.             x = int(input())
  50.  
  51.         if x==9:
  52.             exit()
  53.  
  54.  
  55.  
  56. if __name__ =="__main__":
  57.     main("cottge,gvina,ramin")
Advertisement
Add Comment
Please, Sign In to add comment