So I’m trying to make a program that tells the user how many numbers both inputted numbers have in common FOR EXAMPLE: if inputted n1 = 765 and n2 = 572 then the program returns 2 because both numbers …
So I’m trying to make a program that tells the user how many numbers both inputted numbers have in common FOR EXAMPLE: if inputted n1 = 765 and n2 = 572 then the program returns 2 because both numbers …
I intend to send message to many numbers, but this is my code and issue (code is made shorter and required lines are here): msg = ‘test message’ phone_numbers = [‘+989111111111’, ‘+989111111112’, ‘+…
I’m trying to replace equal consecutive numbers in a list to nan. I having problems to replace all values when there is a odd number of equal consecutive numbers. This is my code, very simple: list= […
I want to just move the zero’s to left and don’t want to sort the list. For example, if my list is like: nums = [1, 10, 20, 0, 59, 63, 0, 8, 0] Here’s the output which I desire after moving all the …
I have a dictionary of the format: d = {‘award1’ : { ‘nominees’: [‘name1’, ‘name2’], ‘presenters’: [‘name3’, ‘name4’], ‘winner’ : ‘name1’ } ‘…
Here’s the coursera Google question prompt that I’m having issues with: The skip_elements function returns a list containing every other element from an input list, starting with the first element. …
My Goal – To list only 5 entries when using OS walk. So far I have only been able to get a list of everything that I find using OS.Walk or only list one entry. (By using the return function) My code: …
I’m trying to figure out a way to find all the elements that appear between two list elements (inclusive) – but to do it without reference to position, and instead with reference to the elements …
I am getting data from database and storing it in a list called relays. this list currently looks like this: relay: [(4, ’26’, ’19’), (5, ’13’, ‘6’)] the first number of each item is the id number …
enter image description here Hi, I am using VScode for python. I face an annoying point in autoformat that a long list is broken into multiple lines as shown in the picture. I try to change wordwrap …