File size: 289 Bytes
e7ef6c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import random
import string


def random_char(y):
    """
    Generate a random string of specified length.

    Parameters:
    - y (int): Length of the random string.

    Returns:
    str: Random string.
    """
    return "".join(random.choice(string.ascii_letters) for _ in range(y))