I have a string as follows:
names = "name:fred, name:wilma, name:barney, name2:gauss, name2:riemann"
let's say the string names has name and name2 attributes.
How do I write a function, is_name_attribute(), that checks if a value is a name attribute? That is is_name_attribute('fred') should return True, whereas is_name_attribute('gauss') should return False.
Also, how do I create a comma separated string comprising of only the name attributes i.e.,
"fred, wilma, barney"