Python tools for doing stuff with letters.
Project description
Letter Tools
This is a very simple module that allows you to randomly get letters and make letter for loops.
Installing
To install use this command:
$ pip install letter-tools
Examples
First an example for randomly picking a letter.
>>> from letter_tools import rand
>>> rand("a", "h")
c
>>> rand("a", "h")
g
>>> rand(1, 10)
5
>>> rand(1, 10)
7
Another example for randomly picking a letter out of numbers.
>>> from letter_tools import randlet
>>> randlet(4, 8)
h
>>> randlet(5, 7)
e
Next an example for ranges.
>>> from letter_tools import Range
>>> for i in Range("i"):
... print(i)
...
a
b
c
d
e
f
g
h
i
>>> for i in Range("d", "g"):
... print(i)
...
d
e
f
g
>>> for i in Range(1, 5):
... print(i)
...
1
2
3
4
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
letter-tools-0.0.2.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for letter_tools-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04fe16b7b5a2945f8202d6e0d41f62f430f92f280fabbdcbc6919e552045beea |
|
MD5 | f5b1fe2ba98779c691b8dd203a7146e6 |
|
BLAKE2b-256 | 548fc83cfe585377de13a0620066a9d0957c27666c5f168b2f7911fdc0c5fdbb |