Why I get AttributeError: 'float' object has no attribute '3f'?
Try this instead,

  print(
"{:.3f}% {} ({} sentences)".format(pcent, gender, nsents)
)


Refer the latest docs for more examples and check the Py version!