Created
February 5, 2018 11:28
-
-
Save ErickMwazonga/a5b863c8fd7081c3175c40669ebde0ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def _generate_cart_id(): | |
cart_id = '' | |
characters = 'ABCDEFGHIJKLMNOPQRQSTUVWXYZabcdefghiklmnopqrstuvwxyz1234567890!@#$%^&*()' | |
cart_id_length = 50 | |
for y in range(cart_id_length): | |
cart_id += characters[random.randint(0, len(characters)-1)] | |
return cart_id | |
print(_generate_cart_id()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment