Language Detection in Python using langdetect

This Python script demonstrates how to detect the language of a given text using the langdetect library.

from langdetect import detect 
 
# Input text in any language 
text = input("Enter any text in any language: ") 
 
# Detect and print the language 
print(detect(text))

Make sure you have the langdetect library installed before running the code.