{"id":14582,"date":"2021-10-01T10:00:08","date_gmt":"2021-10-01T04:30:08","guid":{"rendered":"https:\/\/python-programs.com\/?p=14582"},"modified":"2021-11-22T18:33:30","modified_gmt":"2021-11-22T13:03:30","slug":"python-program-to-find-the-least-frequent-character-in-a-string","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-the-least-frequent-character-in-a-string\/","title":{"rendered":"Python Program to Find the Least Frequent Character in a String"},"content":{"rendered":"

Give the string the task is to print the least frequent character in a string in Python.<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string =zzzyyddddeeeee<\/pre>\n

Output:<\/strong><\/p>\n

The least frequency character in the given string zzzyyddddeeeee is [ y ]<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given string =btechgeeks<\/pre>\n

Output:<\/strong><\/p>\n

The least frequency character in the given string btechgeeks is [ b ]<\/pre>\n

Program to Find the Least Frequent Character in a String in Python<\/h2>\n

Below are the ways to print the least frequent character in a string in Python.<\/p>\n