>>> import random
>>> s="abcdef123"
>>> ''.join(random.sample(s,len(s)))
'1f2bde3ac'
More Related Contents:
- Most efficient way to build single-element list from string with or without spaces? [closed]
- Python String concatenation with in double quotes [closed]
- User input integer list [duplicate]
- How to extract numbers from a string in Python?
- String comparison in Python: is vs. == [duplicate]
- How can I fill out a Python string with spaces?
- Simpler way to create dictionary of separate variables?
- How to display a float with two decimal places?
- What does preceding a string literal with “r” mean? [duplicate]
- What’s the difference between str.isdigit, isnumeric and isdecimal in python?
- Convert floating point number to a certain precision, and then copy to string
- Is there a generator version of `string.split()` in Python?
- How can I remove duplicate words in a string with Python?
- Convert hex string to integer in Python
- Python string with space and without space at the end and immutability
- Time complexity of string concatenation in Python [duplicate]
- Removing list of words from a string
- How to make a string’s content appears on screen as we type on keyboard? [duplicate]
- Perform a string operation for every element in a Python list
- Python reverse-stride slicing
- How to remove duplicates only if consecutive in a string? [duplicate]
- Iterate over the lines of a string
- Insert some string into given string at given index
- Print all items in a list with a delimiter
- Element-wise string concatenation in numpy
- How can I copy a Python string?
- Reverse a string without using reversed() or [::-1]?
- Are strings pooled in Python?
- How does str(list) work?
- How to remove all integer values from a list in python