Skip to main content

A compilation of additional functions for use in varying purposes in Python

Project description

AVAILABLE FUNCTIONS:

replace_char_in_string(string: str, newChar: str, index: int) -> str
  • Replaces char in string(str) at position index(int) with newChar(str). Returns str.

list_to_string(changeList: list) -> str
  • Converts changeList(list) to str. Returns str.

to_list(to_list) -> list
  • Converts to_list to list. Works with both str and int. Returns list

list_to_2d_list(changeList: list) -> list
  • Converts changeList(list) to 2-dimensional list. Returns list

get_key(dictionary: dict, value)
  • Returns key of value in dictionary(dict)

is_vowel(string: str) -> bool
  • Returns True if all char in string(str) is a vowel. Returns False if not.

remove_char_in_string(string: str, index: int) -> str
  • Removes char in string(str) at index(int). Returns str

get_divisors(number: int) -> list
  • Returns list of divisors of number(int)

is_palindrome(toCheck) -> bool
  • Returns True if toCheck is palindrome. Returns False if not. Works on str and int.

is_even(number: int) -> bool
  • Returns True if number(int) is even. Returns False if not.

is_prime(number: int) -> bool
  • Returns True if number(int) is prime. Returns False if not.

Change Log

1.0.1 (27/07/2020)

  • Addition of type hints to functions

  • Updated README

1.0.2 (27/07/2020)

  • Fix README formatting

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

moreFunctions-1.0.2.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file moreFunctions-1.0.2.tar.gz.

File metadata

  • Download URL: moreFunctions-1.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.4

File hashes

Hashes for moreFunctions-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b8a883439991af7cba57961dc59d5079afbde10f89f08e05c1714a49a26f779d
MD5 4ee7a406d6c58ea6dcffce0239c15f10
BLAKE2b-256 db30af22cc986fc61152b6b757b778251760aa0db7b870b96c1d0789c1e4cf80

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