Generates a random string of fixed length. Args: string_length (int, optional): Fixed length. Defaults to 3. Returns: str: A random string
(string_length=6)
| 2534 | |
| 2535 | |
| 2536 | def random_string(string_length=6): |
| 2537 | """Generates a random string of fixed length. |
| 2538 | |
| 2539 | Args: |
| 2540 | string_length (int, optional): Fixed length. Defaults to 3. |
| 2541 | |
| 2542 | Returns: |
| 2543 | str: A random string |
| 2544 | """ |
| 2545 | import random |
| 2546 | import string |
| 2547 | |
| 2548 | # random.seed(1001) |
| 2549 | letters = string.ascii_lowercase |
| 2550 | return "".join(random.choice(letters) for i in range(string_length)) |
| 2551 | |
| 2552 | |
| 2553 | def coords_to_geojson(coords, output=None): |
no outgoing calls
no test coverage detected