The fundamental group of space which has both an H and a co-H structure Assertion: The fundamental group of a space which has an $H$- and a co-$H$ structure is trivial or infinite cyclic.
Why this is true?
(added conditions: one should probably assume that the space is connected and has the homotopy type of a CW complex)
 A: If $X$ is co-H, then $\pi_1(X)$ must be a free group.  If $X$ is H, then $\pi_1(X)$
must be abelian.  The only free group that is abelian is $\mathbb{Z}$.
Argument for the first assertion:
The co-H structure (and Van Kampen) gives a factorization 
$$
\pi_1(X)\xrightarrow{i_*} \pi_1(X)*\pi_1(X)\xrightarrow{j_*} \pi_1(X)\times\pi_1(X)
$$
of the  map $\Delta_*$ induced by the diagonal $\Delta:X\to X\times X$.  This shows that $\pi_1(X)$ is isomorphic to a subgroup
of $G = (j_*)^{-1}( \mathrm{im}(\Delta_{*}))$, which is free on the elements 
$\{ x \bar x\}$  ($x$ and $\bar x$ represent the same element $x\in\pi_1(X)$ 
in the two summands of
$\pi_1(X)*\pi_1(X)$).  Now we are done because a subgroup of a free group is free. 
A: Another argument which does it: 
A path connected based space $X$ is a co-$H$ space if and only if the evaluation map $\Sigma \Omega X \to X$ admits a section up to homotopy. This will imply that $\pi_1(X)$ is a retract of $\pi_1(\Sigma \Omega X)$, and it's easy to see that the latter has a free fundamental group
(generated by elements of $\pi_1(X)$). Now use the fact that a subgroup of a free group is free.
The rest of the argument goes as Jeff says: the fundamental group of an $H$-space is abelian.
Addendum
If in addition we assume all $X$ appearing above have the homotopy type of a finite complex, then we can actually give a complete classification.
First of all, the existence of an $H$-space structure implies that $X$ satisfies Poincare duality (this is well-known and can be deduced from the structure theorem for connected Hopf algebras; I also gave an independent proof in one of my papers--I can't remember which one). 
Secondly, since $X$ is also co-$H$, there are no non-trivial cup products of
classes in positive degrees. 
If we combine these two statements (duality + no cup products) we infer that $X$ has cohomology concentrated in degrees $0$ and some integer $n$. If $X$ isn't a contractible,
it follows from duality that $n > 0$ and $H_n(X) = \Bbb Z$. It follows that $X$ is a cohomology $n$-sphere.  
Since $X$ is an $H$-space it is a simple space, so $X$ is then a
homotopy $n$-sphere (proof: if $n = 1$ represent the generator of $\pi_1$ 
by a map $S^1 \to X$, this will be a homology isomorphism and then apply the Whitehead theorem. If $n > 1$ use the fact that $X$ must be simply connected and then use the Hurewicz theorem to represent the generator of $H_n(X)$ by a map $S^n \to X$ and argue as in the $n=1$ case).
Now, it is well known (using say, Hopf invariant one) that the $n$-sphere is an $H$-space
iff $n = 0, 1,3,7$, so we've shown:
Theorem: 
If $X$ is both an $H$-space and a co-$H$ space and has the homotopy type of a connected finite CW complex, then $X$ has the homotopy type of a point or an $n$-sphere,
where $n$ = 1,3,7. 
