4

I have the following code

def get_random_date(year_start, year_end):
    return "%s-%s" % (random.randrange(year_start, year_end), random.randrange(1, 12))

and I'm getting the warning from Codacy: Standard pseudo-random generators are not suitable for security/cryptographic purposes.

What's should I rewrite this function to avoid such warning.

pedrorijo91
  • 7,635
  • 9
  • 44
  • 82
user1187968
  • 7,154
  • 16
  • 81
  • 152

0 Answers0