Welcome to the world of Lilliputs of Code 💻
Lilliputians of code
The main aim of this repository is to come down to shortest code snippet. In the process of doing so, one can ignore time and space complexity. Make sure the code works (so that you can drink some coffee) and it has the least characters (as caffeine is not good for health as well).
Repository Directory structure:
- Root Directory (Lilliputian-Codes)
- Use Cases
- Lilliput code files (waiting for you)
Example of King of Lilliput Code
Print its own source code:
print(open(__file__).read())
When the above code will be run in python3, the same code will be the output
- Output of the program:
print(open(__file__).read())
Additional Points 📝
- Sometimes one-liner codes can be longer than multi-liner in consideration of number of characaters.
- If you are just copying & pasting it from some source, don't forget to refer & acknowledge the site.
- NOTE: Refering from some other source is a good practice to improve your code.
- In some of the use cases, sample code is given. It is just for reference, it's not necessary to shorten that particular code itself if in case if it is an algorithm based usecase. It means that you can use any techniques for use cases like linear search, binary search etc. But in case of a random specific code snippet given, shorten that particular code itself.
- You can ulter the print commands.
- For example: print("Yes, the number is present in the array") can be written as print("Yes") {to decrease count of characters}
Instead of doing this:
tmp = y
y = x
x = tmp
Do this:
x,y=y,x
Instead of:
a = Function_name(value)
print(a)
Do this:
print(Function_name(value))
Rules for raising a PR:
- Understand the main aim of the repository.
- Fork the repository. You can clone/download the repository as well.
- Check the avalaible issues.
- Tag the author asking for permission on which you wish to work on.
- After getting the approval to work on a particular issue, start working on the issue.
- After making the required commits, raise a PR.
- Don't forget to refer the issue for which you r raising the PR for.
- Wait for the approval.
- If there would be any conflicts, you would be inforomed about the same.
- If everything seems correct, hurray you have done it.
- You will get a chance to mention the name of the coffee you like to have.
Star the repository for easy access


