+ 2

# generate with python. help me

hello guys I'm new and I'm learning python,I want to make a code that replaces X with random numbers example 5454545xxxxx result 545454548965 something like that, who can help me please

28th Jul 2022, 5:16 PM
9 ответов
+ 5
Kevin Alvarado , can it also be like 548545xx or 548545xxxxxxx or 548xxxxxxxxxx ? the question is, if the number of 'x' is always the same or does it vary?
28th Jul 2022, 8:38 PM
Lothar
+ 5
Kevin Alvarado , the count of digits that have to be created randomly, is marked with 'x' in your sample. in this case it is 5 digits. can this also be an other count like 2 or 6?
28th Jul 2022, 7:58 PM
Lothar
+ 2
how to solve the task: since we use the random module, we have to import it. from the module we can use the choices() function, to create a number for each "x" >>> for functions, methods and so on, use the python reference or use google <<< see my hints to solve this task: https://code.sololearn.com/cwxgtS8jHi59/?ref=app
30th Jul 2022, 5:15 PM
Lothar
+ 1
I don't fully understand what you're trying to do from the example, but I think you can try these examples: https://datagy.io/JUMP_LINK__&&__python__&&__JUMP_LINK-random-number/
28th Jul 2022, 5:51 PM
Lisa
+ 1
It always vary
30th Jul 2022, 2:07 AM
+ 1
Yes it also be like 5272828xx or 272727xxxx 282828xxxxxxxx
30th Jul 2022, 2:23 AM
0
I want to make python replace some X with random numbers example 548545XXXX RESULT 5485451234 something like that
28th Jul 2022, 8:15 PM