I have an html file which I open in notepad and read in python as list the html is done like this: I’m making a search on word “data” and from there I manipulate the string in order to get the data. Since I need to iterate this research and I don’t want to start everytime from the first “data”/”time”-row,
Tag: while-loop
Python Trying to assign 100 values to 100keys with some conditions
I’m new at python so please go easy on me. The users is a dict [str,list[str].The keys are just user1, user2 etc until 100. The list of strings contains 10 songs each. The premade_playlist also has keys premade1, premade2 etc until 100.The values are also a dict [str,list[str] and contains about 50 songs in the list[str]. I am trying to
I can’t make a foor loop to put number before video_title and URL in pytube
i just want to give program a url of a playlist and print the title and urls and before titles and urls i want be Ordinal numbers also i new in python i try for loop and while loop an i get list error Answer I think you are missing in “for” loop, you tried to use as index for
For loop monthly budget program creating error
I am running this for loop code and it is creating an error, I cannot find out the problem with it Any ideas on why I am getting this error? I have tried to figure it out on my own but I dont know why it is wrong Answer Your problem is that the for-loop variable month is an integer,
increase the value of x by 1 [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 4 months ago. Improve this question
Second instance of a money value print returns a value different than the first print with Python
I’m working on a program that is a simulation of an order form/receipt. First, the program prints an invoice, then later prints a receipt based on which payment schedule the user selects (1-4 years) My problem is that I can’t find a way to get the invoice and receipt to print the same monthly payment. This is the code used
Two while Loop Statements showing different results
I am new to python and struggling with 2 simple sets of code in which there is while loop used with a little difference (atleast in my opinion). These code should print ‘i’ while it is less than 6 but one set of code is printing ‘1 2 3 4 5 6’ and the other is printing ‘0 1 2
How to print characters without a new line, inside a while loop, and with sleep?
I just realised, I can’t print a character, on the same line with a delay. I can only see the result after I break the loop with CTRL+C. Is there a solution for that? I would like to see each point being printed ….., with a delay. Answer Output is probably buffered, it would eventually output to the terminal after
While/For/If Else Loop after checking user input
I’m new to Python and learning. I’m trying to write a program to: User input full name (with space) Check duplication to a list (I used split and join to compare strings) If find a duplication, re-input new name If not, simply break the loop and print “Thanks” I only need to print “Duplicated” or “Thanks” 1 time, not multiple
looping through dictionary and printing first value where condition is met
Having some trouble getting this simple conditional to work. I have a dictionary with 10 key-value pairs as follows: I’m trying to loop through the dictionary and print the key for the first value that is below 0.05. This is the code I have right now: Can anyone help me see where I’m going wrong here? Edit: It should be