Skip to content
Advertisement

Tag: for-loop

Check value of yaml child -Python

Hey guys I have two yaml files. One yaml with jobs and ther information as childs. other yaml (yaml2) with requirements: and I want to check if the value of the Child “stage” is the same as in the requirements in my code the father node must be generic so it can be different jobs. But it can have the

Generating dictionary does not always work

I am trying to generate a dictionary automatically with a for loop (i < numero_usuarios), the keys are taken from a list with names, and the values are randomly generated with a random.randint(1, 10), the problem is that it does not always generate the amount I want. For instance, I want to create 10 users(usuarios), it sometimes creates 7, 8

How to process files based on their date in Python?

I have two sort of files, xml files and txt files. The files have a date in their name. If the date of the xml file matches the date of a txt file I want to open the txt file do some processing and write the output to a list. After that I want to change the xml file. Multiple

Advertisement