Skip to content
Advertisement

Tag: list

list.append takes exactly one argument (gived 2)

I am doing a little game, I am new at programming so i wanna start somehow so i have got a game and i want to add animation when you are walking. But i am not able to use more images it is showing me this error. and if you will be open to give me advise for using animation

sorting a list of females and males

I have an input: and I must sort it in the way that first comes all f(females) ordered by alphabet then comes all m(males) ordered by alphabet. This is the desirable output: .here is my code: my code dose not sort f.(females) correctly and Sara comes first. Could anybody help me? Answer Try this, it should be fine Output :

How to find specific item/s in list/s in Python

I am new to this and I would to find specifc index of item from lists in list in Python. It only work with multiple lists in one list, and I would to know if you know much simple way to search trought all existing and new added list to find specific index of an item and more than in

Print number of occurrences of any items in a list in paths

I am using os.walk to identify paths in a generic source directory (SRC) that contain any strings in my_list: And let’s say that print(source_path) gives the following: My goal is to shutil.move my source_path’s, but since, for example, moving /User/dir_1/bird_files/ and then trying to move /User/dir_1/bird_files/bird_a_files/ will result in a FileNotFound Error, I want to filter my source_path’s to include

Sorting lists within a list in Python

I have a list J consisting of lists. I am trying to sort elements of each list in ascending order. I present the current and expected outputs. The current output is The expected output is Answer Just remove the range Output:

Python making scoreboard based on list input

I am trying to make a scoreboard based on an input which has a list of all rounds played and their result. I have already split this input so that each round of games is one list; in it, one item is one game played. Each game is noted as ‘White Black ResultWhite ResultBlack’. For example, with three rounds and

Advertisement