Category : list

I have an array, where I want a specific index to be merged. ["captain:", "robot", "alpha", "beta:", "gama", "delta:", "fighter", "test", "exp"] the idea of this, every even element should contain : and the rest of the elements should not contain : The output I want: ["captain:", "robot, alpha", "beta:", "gama", "delta:", "fighter, test, exp"] ..

Read more

Hey Guys i need your help. I just started programming in python and right now i try to learn threading in python. This is the task: Implements a function with two parameters: (i) an input list of numbers (int) and (ii) a Output list in which the numbers should be sorted. As long as there ..

Read more

I need to create a function that reads the data given and creates a list that contains tuples each of which has as its first element the name of the airport and as its second and third its geographical coordinates as float numbers. airport_data = """ Alexandroupoli 40.855869°N 25.956264°E Athens 37.936389°N 23.947222°E Chania 35.531667°N 24.149722°E ..

Read more

I have 2 lists [A,B,C,D,E,F] – first list [X,X,X,X,X,X] – second list I would like to take last element of the first list and if there are any elements in the second list move them to the left and add the element as last. [A,B,C,D,E,F] [X,X,X,X,X,X] [A,B,C,D,E] [X,X,X,X,X,F] [A,B,C,D] [X,X,X,X,F,E] Till there is only first ..

Read more