Personally tiny useful Python tips
Project description
Personally tiny useful Python tips
Version
0.0.1 - datetime object & string Integration management in Python
© 2024 GitHub : https://github.com/YongBeomKim
with open(file_path, 'r') as f: file_content = f.readlines()
new_file_content = [] for line in file_content: if line.startswith(f"{list_name} = "): # 해당 List 변수 line을 찾아서 내용 수정 list_str = line.split("=")[1].strip() list_variable = ast.literal_eval(list_str)
if isinstance(list_variable, list):
modified_list = modification_function(list_variable)
new_file_content.append(f"{list_name} = {str(modified_list)}\n")
else:
print(f"변수 '{list_name}'이(가) List 형태가 아닙니다.")
return
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytip-0.0.15.tar.gz.
File metadata
- Download URL: pytip-0.0.15.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
581424209338d2635da08e2fdbd74fee7d858f6161e17000e53de862b4eeedee
|
|
| MD5 |
51280a0c012fd788da1057d633d2a83b
|
|
| BLAKE2b-256 |
2fc003a6c4e5d41bc97589792c9e701335bd7c650c13a0b9decdd25e587efa29
|
File details
Details for the file pytip-0.0.15-py2.py3-none-any.whl.
File metadata
- Download URL: pytip-0.0.15-py2.py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2f99b696d41d0c891e7239c300f755ce78dfb79d756bafc543f82c31fd50dba
|
|
| MD5 |
7e7c0a8b0c0a1837864eba84c5c90fa2
|
|
| BLAKE2b-256 |
ac0abea37435f7d352e8f364053f458b5e06329d4e89d5938599b065461eb569
|