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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: pytip-0.0.14.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.14.tar.gz
Algorithm Hash digest
SHA256 b52de90bb14828358b9650a8100316e4a327ed5e5d2a4fa9944ac4cc6c35f562
MD5 e6f28b0d282b5ca4b2a1a94ce2cadaa0
BLAKE2b-256 dcb7de892320e6565ea24a47ebd281e29319ec6dbb7dc2d97810e45426dc67ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytip-0.0.14-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.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 639d359290b6e883e246242477590ef5930db80d4cc6aadc2b925cad77aacf29
MD5 c8f54d098f6f3cc6e29911febc0390b3
BLAKE2b-256 b26d9591f897881238716feb0e735b130ae26ae364d008006182e5958ddb5553

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