@adnan Actually python code could be simplified. Unlike other languages making it less difficult to control your code/edit it.
for i in xrange(1,101):
   li=[]
   if i%3==0:
      if i%5==0:
        print str(i)+ "FIZZBUZZ"
        li.append(i)
      else:
        print str(i)+ "fizz"
   if i%5==0 and i not in li:
      print str(i)+ "buzz"
regarding your code, there are some issues; particularly the counting variable in a for loop you don't need to increment the iterator (count=count+1) in fact the for loop does it automatically (by 1 if unspecified); you can specify by doing for(start,stop,incremented value)
notice that the loop wont stop at the "stop" value but at stop-1.
also you could always use the % modulo operator to check if the division is total or not, instead of verifying integers which is a pain in the ass.
Don't underestimate python, it is really awesome.
  • The variable count is useless. You already have another variable that takes each successive value from 0 to 99. Can you spot it?
  • Stylistically, it's completely useless to put parenthesis around a variable name. (mult3).is_integer() should be mult3.is_integer()
  • Do not check if a boolean "is True"!
  • You're creating floats and storing them in memory, when you don't really need this conversion.
  • There are function calls you make several times. Why not doing it once, and storing the result in memory?
Here's something already better:
for count in range(-1, 100):
    count += 1
    mult3 = float(count / 3.0).is_integer()
    mult5 = float(count / 5.0).is_integer()

    if mult3 and mult5:
        print "FizzBuzz"
    elif mult3:
        print "Fizz"
    elif mult5:
        print "Buzz"
    else:
        print count
Note that mult3 and mult5 are now storing boolean values. And note that the "if" statements aren't checking agains "is True". We can further improve this, by avoiding the conversion to float:
for count in range(-1, 100):
    count += 1

    # The "%" operator returns the remainder of an integer division.
    # Note that the parens are optional, I just added them for readability.
    mult3 = (count % 3 == 0)
    mult5 = (count % 5 == 0)

    if mult3 and mult5:
        print "FizzBuzz"
    elif mult3:
        print "Fizz"
    elif mult5:
        print "Buzz"
    else:
        print count
Thanks for your help !

@NuclearVision the problem with your piece of code is that it doesn't exactly answer the question, but I will try to work on it and submit it soon, I should work on better understanding lists.
for i in xrange(1,101):
   if i%3!=0 and i%5!=0: print str(i)
      
   li=[]
   if i%3==0:
      if i%5==0: print str(i)+ "FIZZBUZZ";li.append(i);
   else:  print str(i)+ "fizz"        
   if i%5==0 and i not in li: print str(i)+ "buzz"
      
Better? actually i didn't quiet focus on the question, thanks for pointing it out. Will be editing my C++ code.
Better, but not correct yet !

You can see that from the output: http://pastebin.com/5jhut4Bz
I tried to work around your code and came up with this which gives the correct output:
li=[]
for i in xrange(0,101):
        if i%3!=0 and i%5!=0:
                print str(i)
        elif i%3==0 and i%5==0:
                print 'FizzBuzz'
                li.append(i)
        elif i%3==0:
                print 'Fizz'
                li.append(i)
        if i%5==0 and i not in li:
                print 'Buzz'
PS: Don't forget the zero.
for i in xrange(1,101):
   if i%3!=0 and i%5!=0:
      print str(i)
   li=[]
   if i%3==0:
      if i%5==0:
        print str(i)+ "FIZZBUZZ"
        li.append(i)
      else:
        print str(i)+ "fizz"
   if i%5==0 and i not in li:
      print str(i)+ "buzz"
Sorry adnan again my fault, i was getting the wanted output because emacs was compiling my c++ code instead (same name).
ps: 0 is not wanted :]
Ah, crap. Didn't notice. Great, all shiny now !
for i in [ "fizz" if i%3==0 and i%5!=0 else " buzz" if i%5==0 and i%3!=0 else "fizzbuzz" if i%3==0 and i%5==0 else str(i) for i in xrange(1,101)]: print i
  
I thought I'd share this one liner.
2 years later
In Go:
package main

import (
	"fmt"
	"strconv"
)

func fizzbuzz(n int) string {
	var result string
	for i := 0; i <= n; i++ {
		if i%3 == 0 && i%5 == 0 {
			result = "fizzbuzz"
		} else if i%3 == 0 {
			result = "fizz"
		} else if i%5 == 0 {
			result = "buzz"
		} else {
			result = strconv.Itoa(i)
		}
		fmt.Printf("%s\n", result)
	}
	return result
}

func main() {
	fizzbuzz(20)
}
Since we're reviving this thread, I had to try myself at this problem again.
Here's a horrible one-liner, with a more functional approach (no variables are muted), in JavaScript:
console.log((new Array(100)).join(0).split('').map(function(v,i){return(((i+1)%3==0)&&((i+1)%5==0)?"FizzBuzz":((i+1)%3==0)?"Fizz":((i+1)%5==0)?"Buzz":(i+1));}).join("\n"));
Since Array.map() would ignore undefined values, I have to do join() then split() to end up with an array of zeroes (or anything else than undefined). Anyone knows a better way of doing it in javascript?