<jupyter_start><jupyter_text>---title: "Joining the string"author: "TACT"date: 2019-04-20description: "-"type: technical_notedraft: false---<jupyter_code># Assigning a string value to the variable
input = 'New Delhi is the capital of India'
# Split the string into words by calling split() built-in function
data = input.split(' ')
# Print the splitted string
print(data)
# Join the string by calling join() built-in function
string = '-'.join(data)
# Print the joined string
print(string)<jupyter_output>New-Delhi-is-the-capital-of-India
{'fraction_non_alphanumeric': 0.12267657992565056, 'fraction_numerical': 0.01486988847583643, 'mean_word_length': 5.416666666666667, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '583275', 'license': 'MIT', 'n_tokens_mistral': 181, 'n_tokens_neox': 170, 'n_words': 56, 'path': 'docs/python/basics/Joining-the-string.ipynb', 'repo_name': 'Sanjay-V/mlnotes', 'size': '538'}