Introducing the "lorem" function for Python

Ever get tired of using the boring print command in Python? Ever want an overcomplicated command that performs a large a mount of calculations for no reason at all? If so, then the lorem function is the one for you. It is 30 lines of code to simply display text in the console. It performs many calculations and uses multiple needless variables just to display your text as you would with the print function.

Check out the source code
def lorem(ipsum):
  '''Prints the output :)'''
  dolor = ""
  sit = ""
  while True:
    if len(ipsum) == len(ipsum):
      amet = len(ipsum.split("\n"))
      for text in ipsum.split("\n"):
        for char in text:
          dolor += char
        amet -= 1
        if amet != 1:
          dolor += "\n"
  while True:
    if len(dolor) == len(ipsum):
      for text in range(len(dolor)):
        if dolor[text] == ipsum[text]:
          sit += dolor[text]
  while len(dolor) != len(sit) and len(sit) != len(ipsum) and len(dolor) == len(ipsum):
    for consectetur in range(int((len(ipsum) + len(dolor)) / 2)):
      if ipsum[consectetur] != dolor[consectetur + 1]:
        def adipiscing(text):
          for elit in text:
            if elit != lorem:
              print(elit, end="", flush=True)

Wow! It’s such a useless feature!

1 Like

I feel like creating my own now.

I came up with an even more unnecessary function! In your lorem function, you could replace this line of code: print(edit, end="", flush=True) to this: pass.

No I couldn’t. That’s the part of the code that displays the text.

1 Like

I realized that the print function is 4 times faster than the lorem function.

1 Like

I’m currently in study hall at school right now and feeling really bored, so I made my own version of it. Here is the code below:

import random

def _print(input_text):
    def custom_flip_case(char, original_char):
        return char.upper() if original_char.isupper() else char.lower()

    def custom_scramble_word(word):
        if len(word) <= 3:
            return word
        first_char = word[0]
        last_char = word[-1]
        middle_chars = list(word[1:-1])
        return first_char + ''.join(middle_chars) + last_char

    transformed_text = ""
    preserved_text = ""

    line_count = len(input_text.split("\n"))
    for line in input_text.split("\n"):
        for char in line:
            preserved_text += char
        line_count -= 1
        if line_count != 0:
            preserved_text += "\n"

    for i in range(len(preserved_text)):
        if preserved_text[i] == input_text[i]:
            transformed_text += preserved_text[i]

    result = ""
    for line in transformed_text.split("\n"):
        for word in line.split():
            scrambled_word = custom_scramble_word(word)
            for char, original_char in zip(scrambled_word, word):
                if char.isalpha():
                    result += custom_flip_case(char, original_char)
                    result += char
            result += " "
        result = result[:-1]  
        result += "\n"



You can create something like a competition in which everyone will have to create the slowest possible text output function without using the delay function, similar to the lorem function.


So I made it take 58+ minutes to print each letter :skull_and_crossbones:. Here is the code, the function is made with 11 lines.

def slow(text):
    i = 0
    print_number = 0
    while True:
        print_number += 1
        if print_number == 10**10:
            print_number = 0
            print(text[i], end="", flush=True)
            i += 1
        if i >= len(text):

slow("Hello World!")
1 Like

what about instead of just while loops… AI interpreting the text instead?

1 Like