devxlogo

Web Development

Join Paths in Python

Follow this example to see how to join paths in Python. root= “/root”str = os.path.join(root, “Y2019”, “2019.txt”)

Concatenate Strings in a List

Use the join operator to concatenate strings in a list. str = [“devx”, “is”, “for”, “developers”] str = (” “.join(str))

Autoplay an Audio File Using the Audio Tag

The audio tag lets you play an audio file on a webpage. Its syntax is very simple. Please note the usage of “autoplay” attribute. It auto plays the music file