Category : variables

for i in range(len(words)): ttuple=words[i] # ttuple2=words[i-1] # if ttuple[1]%ttuple2[1]!=0: # bbb=bbb+"n" fish_list = [] read_operation = open(r’C:UserspiotrPycharmProjectsimportDataryby.txt’, encoding="utf-8") lines = read_operation.readlines() for line in lines: fish_list.append(line.strip().casefold()) for fish in fish_list: print(repr(fish)) if fish in ttuple[4]: print("ccccccccccccc"+fish.strip()) print("aaaaaaaaaaa" + str(ttuple[4])) What happend here? When I compare in is like if aaa!=ttuple[4] value if fish is ..

Read more

#>>>>>>>>>WHEN VOMITING…… Apply 5C’s if ‘vomiting’ in Pres_Comp: Course_V = input(‘Tell me about the vomiting’ +’….’+’When did the vomiting begin?’) Cause_V = input(‘Any idea what might be responsible for the vomiting?’) dete_P = False if ‘yes’ in Cause_V: dete_cause = input(‘What do you think might be responsible for causing the vomiting? ‘) if ‘poison’ or ..

Read more

I have a very normal function- def test(var_main:str): var1 = var_main.replace(" ", "").lower() print(var1) var2 = "this is unupdated var2" if var1 == "Thisisvar1": var2=="this is updated var2" print(var2) test("This is var1") I want the var2 to get updated due to if…else. But it seems it still prints the previous value. Why is this happening? ..

Read more

I want to dynamically assign the pandas data frame variables to dataframe, Up_dataframe, Down_dataframe the dataframe variables would be named as the following df_dataframe, UP_dataframe, Down_dataframe. How would I be able to fix the code below and assign the variables? import pandas as pd def run(): dataframe = {‘Values’: [1,2,3,4], ‘Montly PnL’: [10,2,2,1], ‘Long Montly ..

Read more