<jupyter_start><jupyter_text>String Formatter<jupyter_code>str = 'Hello World'
print('Welcome {}'.format(str))
# Using f-strings
print(f'Welcome {str}')
# Width and alignments
marvel = [('Film', 'Character', 'Actor'),
          ('Iron Man', '<NAME>', '<NAME>.'),
          ('The Incredible Hulk', 'Bruce Banner', '<NAME>'),
          ('<NAME>', 'Thor', '<NAME>'),
          ('Captain America: The First Avenger', '<NAME>', '<NAME>'),]
for film in marvel:
    print(film)
# Alignment with variable space
for film in marvel:
    print(f'{film[0]:{40}}, {film[1]:{20}}, {film[2]:{10}}')
for film in marvel:
    print(f'{film[0]:^{40}}, {film[1]:{20}}, {film[2]:.>{20}}')<jupyter_output>Film                  , Character           , ...............Actor
                Iron Man                , <NAME>          , ...<NAME>r.
          The Incredible Hulk           , Bruce Banner        , ........<NAME>
             <NAME>              , Thor                , .....<NAME>
   Captain America: The First Avenger   , <NAME>       , .........<NAME>
{'fraction_non_alphanumeric': 0.22264875239923224, 'fraction_numerical': 0.01727447216890595, 'mean_word_length': 2.0676470588235296, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '63968', 'license': 'MIT', 'n_tokens_mistral': 350, 'n_tokens_neox': 331, 'n_words': 82, 'path': 'NLP/Working with Text.ipynb', 'repo_name': 'jayant2014/MyML', 'size': '1137'}