Skip to main content

Personally tiny useful Python tips

Project description

Personally tiny useful Python tips

License Docs PyPI version fury.io

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytip-0.0.15.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytip-0.0.15-py2.py3-none-any.whl (28.0 kB view details)

Uploaded Python 2Python 3

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

Hashes for pytip-0.0.15.tar.gz
Algorithm Hash digest
SHA256 581424209338d2635da08e2fdbd74fee7d858f6161e17000e53de862b4eeedee
MD5 51280a0c012fd788da1057d633d2a83b
BLAKE2b-256 2fc003a6c4e5d41bc97589792c9e701335bd7c650c13a0b9decdd25e587efa29

See more details on using hashes here.

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

Hashes for pytip-0.0.15-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2f99b696d41d0c891e7239c300f755ce78dfb79d756bafc543f82c31fd50dba
MD5 7e7c0a8b0c0a1837864eba84c5c90fa2
BLAKE2b-256 ac0abea37435f7d352e8f364053f458b5e06329d4e89d5938599b065461eb569

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page