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
5
#Using step
>>> for i in range(1, 5, 3):
... print(i)
...
1
4
>>> for i in range("d", "g", 3):
... print(i)
...
d
g
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.6.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for letter_tools-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ce73aa35317737042f300e4af3b7fd68a812bae8e1514028ab2aae6e75858b7 |
|
MD5 | ef513a3c8c29677a7902d09e75f21007 |
|
BLAKE2b-256 | d622a779d1ed3a2c1d1ffcd157001d2656af1a474cff063e725bc7b069129a1e |