Skip to content
/ ilen Public

Return index of the last item in table or string, rather than it's length

Notifications You must be signed in to change notification settings

kinnyugen/ilen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

ilen (index-len)

This is a very basic Python module that checks for length of strings and lists like len(), however, it returns the index of the last item, rather than the length of the whole table.

Usage Example

from ilen import ilen

# Get the last item in the table
table_1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 01, 11]
table_1_last_item = ilen(table_1) # 11

string_1 = "1 2 3 4 5 6 7 8 9 01 11"
string_1_last_char = ilen(string_1) # 1

print(str(table_1_last_item) + string_1_last_char) # 111

About

Return index of the last item in table or string, rather than it's length

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages