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.16.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.16-py2.py3-none-any.whl (28.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytip-0.0.16.tar.gz.

File metadata

  • Download URL: pytip-0.0.16.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.16.tar.gz
Algorithm Hash digest
SHA256 d5bd0546a22dc225852537287bd420e236ab5ac448394b901d8b30e37295c5e6
MD5 e896dc03647f60d14e9363d00ef82022
BLAKE2b-256 081546c79158f1356143ed540d95ba982ad92452cb0a48cc5b674542cd197fc3

See more details on using hashes here.

File details

Details for the file pytip-0.0.16-py2.py3-none-any.whl.

File metadata

  • Download URL: pytip-0.0.16-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.16-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 910be53dab4a211fab7986ab0d8ab07867a5572fd880c8b8daf1dd23e4e73ef3
MD5 6ac3bb1a57ec284ecf70e8d731a01313
BLAKE2b-256 869459ed3286d8b1d84ef2df02b0b124b7732eff719af42f04237dc9951cbc69

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