Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the game of text life from daily programmer | |
# https://www.reddit.com/r/dailyprogrammer/comments/3m2vvk/20150923_challenge_233_intermediate_game_of_text/ | |
# by Anjana and Alicia | |
import random | |
def gridafy(inputString): | |
""" INPUT: a string with new line returns, | |
OUTPUT: a list of strings that each fit on one line, with shorter lines padded with spaces """ | |
splitted = inputString.split("\n") |